home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / bing-1.1.3.lha / bing-1.1.3 / src / makefile.nt < prev    next >
Makefile  |  1997-06-05  |  3KB  |  155 lines

  1. #####
  2. # Paths
  3. #####
  4.  
  5. # This path should point to where the icmp files are.
  6. !ifndef ICMP_DIR
  7. ICMP_DIR=../icmp_dev-0.1.1
  8. !endif
  9. ICMP_INCLUDE=$(ICMP_DIR)
  10. ICMP_LIB=$(ICMP_DIR)/i386
  11.  
  12. # This is where you want the compiler to put the binaries
  13. # (including bing.exe).
  14. BIN=bin
  15.  
  16. #####
  17. # Macro definitions
  18. #####
  19.  
  20. # General options
  21. APPVER = 4.0
  22. TARGETOS = BOTH
  23. TARGETLANG = LANG_FRENCH
  24. CPU=i386
  25. !ifndef DEBUG
  26. NODEBUG=1
  27. !endif
  28.  
  29. !include <win32.mak>
  30.  
  31. # compilation
  32. !ifdef BROWSER
  33. cbrowser=-FR$(*D)/ 
  34. !endif
  35.  
  36. !ifdef DEBUG
  37. cdebug=-Od -Zi -Fd$(*D)/ 
  38. !endif
  39.  
  40. !ifdef DLL
  41. bing_cvars=$(cvarsdll)
  42. !else
  43. bing_cvars=$(cvars)
  44. !endif
  45.  
  46. bing_cvars=-nologo $(bing_cvars) $(cdebug) $(cbrowser) -D$(CPU) -DNO_RANDOM -I$(ICMP_INCLUDE) -I. -Iinclude -c -Fo$(*D)/ 
  47.  
  48. # linking
  49. !ifdef DEBUG
  50. !ifdef DLL
  51. ldebug=-debug msvcrtd.lib
  52. !else
  53. ldebug=-debug libcd.lib
  54. !endif
  55. !endif
  56.  
  57. bing_lflags=-nologo -nodefaultlib $(ldebug) -out:$@
  58.  
  59. !ifdef DLL
  60. bing_libs=$(conlibsdll)
  61. !else
  62. bing_libs=$(conlibs)
  63. !endif
  64.  
  65. bing_libs=$(bing_libs) wsock32.lib $(ICMP_LIB)/icmp.lib 
  66.  
  67. ######
  68. # What to do
  69. ######
  70.  
  71. L_OBJS= \
  72.     $(BIN)/bing.obj \
  73.     $(BIN)/icmp_win32.obj \
  74.     $(BIN)/getopt.obj \
  75.  
  76. L_EXE= \
  77.     $(BIN)/bing.exe \
  78.  
  79. L_BSC= \
  80. !ifdef BROWSER
  81.     $(BIN)/bing.bsc \
  82. !endif
  83.  
  84. all:    bin_dir $(L_EXE) $(L_BSC)
  85.  
  86. clean:
  87.     if exist $(BIN)\*.obj del $(BIN)\*.obj
  88.     if exist $(BIN)\*.exe del $(BIN)\*.exe
  89.     if exist $(BIN)\*.ilk del $(BIN)\*.ilk
  90.     if exist $(BIN)\*.pdb del $(BIN)\*.pdb
  91.     if exist $(BIN)\*.sbr del $(BIN)\*.sbr
  92.     if exist $(BIN)\*.bsc del $(BIN)\*.bsc
  93.     if exist $(BIN)\nul rmdir $(BIN)
  94.  
  95. bin_dir:
  96.     -if not exist $(BIN)\nul mkdir $(BIN)
  97.  
  98. help:
  99.     @echo "Usage: nmake -f makefile.nt [DLL=1] [DEBUG=1] [BROWSER=1] [all | clean | help]
  100.     @echo "
  101.     @echo "   DLL=1
  102.     @echo "      Causes bing to be dynamically linked with the C library.
  103.     @echo "   DEBUG=1
  104.     @echo "      Set DEBUG to 1 to generate debugging information for bing
  105.     @echo "   BROWSER=1
  106.     @echo "      Use this option to generate information for the Microsoft browser
  107.     @echo "
  108.     @echo "   all
  109.     @echo "      This causes bing to be built as specified by the options
  110.     @echo "      above. This is the default action. Note that if you 
  111.     @echo "      change the options you should probably do a 'make clean'
  112.     @echo "      before you re-generate bing.
  113.     @echo "   clean
  114.     @echo "      This action deletes all the generated files *including* 'bing.exe'.
  115.     @echo "   help
  116.     @echo "      This action displays this help information.
  117.  
  118. ######
  119. # Commands
  120. ######
  121.  
  122. # compilation
  123. $(L_OBJS):
  124.     $(CC) $(bing_cvars) -o $*.obj $**
  125.  
  126. # link
  127. $(L_EXE):
  128.     $(link) $(bing_lflags) $(bing_libs) $**
  129.  
  130. # browser
  131. !ifdef BROWSER
  132. $(L_BSC):
  133.     bscmake -nologo -o $@ $**
  134. !endif
  135.  
  136. #####
  137. # Dependencies
  138. #####
  139.  
  140. $(BIN)/bing.obj: bing.c
  141. $(BIN)/icmp_win32.obj: win32/icmp_win32.c
  142. $(BIN)/getopt.obj: win32/getopt.c
  143.  
  144. $(BIN)/bing.exe: \
  145.     $(BIN)/bing.obj \
  146.     $(BIN)/icmp_win32.obj \
  147.     $(BIN)/getopt.obj \
  148.  
  149. !ifdef BROWSER
  150. $(BIN)/bing.bsc: \
  151.     $(BIN)/bing.sbr \
  152.     $(BIN)/icmp_win32.sbr \
  153.     $(BIN)/getopt.sbr \
  154. !endif
  155.